import {EntityId, PageQueryParams} from "kf-web-library";
import {User, User_Summary} from "@/services";

export interface AccessLogPageQueryParams extends Partial<PageQueryParams> {
  searchText?: string;  //访问用户昵称
  ids?: EntityId[];
  accessBizType?: string;  //业务分类 AccessBizType
  accessType?: string;  //访问来源 AccessType
  accessUserId?: number;  //访问用户ID
  timeRange?: string[];  //时间范围 yyyy-MM-dd hh:mm:ss
}

export interface AccessLog {
  id: EntityId; //id
  bizType: string; //业务分类 AccessBizType
  accessSourceId: string; //访问数据ID
  accessType: string; //访问来源 AccessType
  accessUser: User_Summary; //访问用户
  createTime: string; //创建时间
  modifyTime: string; //修改时间
  deleted: number;
}


export interface AccessLog_Create {
  bizType: string; //业务分类 AccessBizType
  accessSourceId: string; //访问数据ID
  accessType: string; //访问来源 AccessType
  accessUserId: number; //访问用户ID
}

export interface AccessLog_Modify extends AccessLog_Create {
  id: EntityId;
}

export interface AccessLog_Patch extends Partial<AccessLog_Modify> {
  id: EntityId;
}

